package A1动态规划;

import java.util.Arrays;

public class LC_674最长连续递增序列 {
    public static void main(String[] args){
        int[] nums={1,3,5,4,7};
        System.out.println(findLengthOfLCIS(nums));
    }
    public static int findLengthOfLCIS(int[] nums) {
        int[] dp=new int[nums.length];
        Arrays.fill(dp,1);
        int result=1;
        for(int i=1;i<nums.length;i++){
            if(nums[i]>nums[i-1])
                dp[i]=Math.max(dp[i],dp[i-1]+1);
            result=Math.max(result,dp[i]);
        }
        return result;
    }
}
